//
//  BossHeadScene.m
//  ShoutBoss
//
//  Created by Luck Mstone on 6/15/09.
//  Copyright 2009 MS. All rights reserved.
//

#import "BossHeadScene.h"
#import "BossHeadBackGround.h"
#import "BossHeadScene/HeadLayer.h"
#import "MenuItem.h"
#import "Menu.h"
#import "cocos2d.h"
#import "BattleScene.h"

@implementation BossHeadScene

-(id) init
{
	self = [super init];
	if(self != nil){
		//BossHeadScene 初始化工作
		//背景精灵
		CGSize s = [[Director sharedDirector] winSize];
		BossHeadBackGround* background = [BossHeadBackGround node];
		[self addChild:background];
		[background setPosition: ccp(s.width/2, s.height/2)];
		
		//顶部菜单选项
		MenuItem *menuItem1 = [MenuItemFont itemFromString:@"Camera" target:self selector:@selector(onCamera:)];
		MenuItem *menuItem2 = [MenuItemFont itemFromString:@"Photo" target:self selector:@selector(onPhoto:)];
		
		Menu *topMenu = [Menu menuWithItems:menuItem1,menuItem2,nil];
		[topMenu alignItemsHorizontally];
		topMenu.position = ccp(s.width/2, s.height/2 + 100);
	
		[self addChild:topMenu];
		
		//下部菜单选项
		MenuItem *menuItem3 = [MenuItemFont itemFromString:@"Previous" target:self selector:@selector(onPrevious:)];
		MenuItem *menuItem4 = [MenuItemFont itemFromString:@"Go Battle" target:self selector:@selector(onGoBattle:)];
		
		Menu *buttomMenu = [Menu menuWithItems:menuItem3,menuItem4,nil];
		[buttomMenu alignItemsHorizontally];
		
		[self addChild:buttomMenu];
		
		//老板头部层
		HeadLayer *headLayer = [HeadLayer node];
		
		[self addChild:headLayer];
	}
	
	return self;
}

-(void)onCamera:(id)sender
{
	
}

-(void)onPhoto:(id)sender
{
	
}

-(void)onPrevious:(id)sender
{
	
}

-(void)onGoBattle:(id)sender
{
	// 切换到Battle
	BattleScene* battleScene = [BattleScene node];
	[[Director sharedDirector] replaceScene:battleScene];
}

@end
